<?php

session_cache_expire(999999999);
$q = $_GET["q"];

include 'operations/connection.php';

$sql = "SELECT e.IDEmployee,e.FullName FROM employee e, department d WHERE e.IDDepartment=d.IDDepartment AND d.IDDepartment='$q' AND State=1;";

$result = mysql_query($sql);

echo "<table border='1' class='table_th' style='height:22px;' cellspacing='0' width='100%'>
<tr style='background-color:#EEE;'>
<td colspan='3'>List Employee</td>

</tr>";

while ($row = mysql_fetch_array($result)) {
    echo "<tr >";
    echo "<td>" . $row['IDEmployee'] . "</td>";
    echo "<td>" . $row['FullName'] . "</td>";
    echo "<td width='20'><a onclick='showReference(" . $row['IDEmployee'] . ")'><img src='images/reference.png' /></a></td>";
    echo "</tr>";
}
echo "</table>";

mysql_close($connection);
?>